# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年02月23日
"""

import docx
from docx.shared import Cm,Pt
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
myDocument=docx.Document()
myHeading=myDocument.add_heading(level=1)
myHeading.alignment=WD_PARAGRAPH_ALIGNMENT.CENTER
myRun=myHeading.add_run('第1部分 唐诗精品')
myRun.font.size=Pt(14)
myRun.font.name='微软雅黑'
myRun.element.rPr.rFonts.set(docx.oxml.ns.qn('w:eastAsia'),'微软雅黑')
myItems=['项1','项2','项3','项4','项5','项6']
for i in range(6):
	myParagraph=myDocument.add_paragraph(text=myItems[i],style='List Number')


myDocument.save('散文名篇.docx')


